package com.lkd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lkd.dto.RegionDTO;
import com.lkd.entity.Region;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RegionMapper extends BaseMapper<Region> {
    List<Region> selectRegionList(RegionDTO regionDTO);
    /**
     * 查看区域详情
     */
    @Select("select * from tb_region where id = #{regionId}")
    Region getRegionById(String regionId);

    /**
     * 删除区域
     */
    @Delete("delete from tb_region where id = #{regionId}")
    boolean deleteById(String regionId);

    boolean insert(RegionDTO regionDTO);

    /**
     * 修改区域
     */
    boolean update(RegionDTO regionDTO);


}
